Practical API Protocol Checking with Access Permissions
نویسندگان
چکیده
Reusable APIs often de ne usage protocols. We previously developed a sound modular type system that checks compliance with typestate-based protocols while a ording a great deal of aliasing exibility. We also developed Plural, a prototype tool that embodies our approach as an automated static analysis and includes several extensions we found useful in practice. This paper evaluates our approach along the following dimensions: (1) We report on experience in specifying relevant usage rules for a large Java standard API with our approach. We also specify several other Java APIs and identify recurring patterns. (2) We summarize two case studies in verifying third-party open-source code bases with few false positives using our tool. We discuss how tool shortcomings can be addressed either with code refactorings or extensions to the tool itself. These results indicate that our approach can be used to specify and enforce real API protocols in practice.
منابع مشابه
API Protocol Compliance in Object-Oriented Software
Modern software development is highly reliant on reusable APIs. APIs often define usage protocols that API clients must follow in order for code implementing the API to work correctly. Loosely speaking, API protocols define legal sequences of method calls on objects. In this work, protocols are defined based on typestates (Strom and Yemini, 1986; DeLine and Fähndrich, 2004b). Typestates leverag...
متن کاملFreebase: A Shared Database of Structured General Human Knowledge
Freebase is a practical, scalable, graph-shaped database of structured general human knowledge, inspired by Semantic Web research and collaborative data communities such as the Wikipedia. Freebase allows public read and write access through an HTTP-based graph-query API for research, the creation and maintenance of structured data, and application building. Access is free and all data in Freeba...
متن کاملChecking Concurrent Typestate with Access Permissions in Plural: A Retrospective
Objects often define usage protocols that clients must follow in order for these objects to work properly. In the presence of aliasing, however, it is difficult to check whether all the aliases of an object properly coordinate to enforce the protocol. Plural is a type-based system that can soundly enforce challenging protocols even in concurrent programs. In this paper, we discuss how Plural su...
متن کاملRole Slices and Runtime Permissions: Improving an AOP-based access control schema
In this paper, we present several issues that need to be addressed to incorporate dynamic permissions –permissions depending on runtime elements– into our current approach to model access control: the role slice. We summarize four tasks that conforms to our future research directions: extending the role-slice artifact to represent permissions based on runtime elements; refining the rules that r...
متن کاملChecking Interference with Fractional Permissions
We describe a type system for checking interference using the concept of linear capabilities (which we call “permissions”). Our innovations include the concept of “fractional” permissions: reads can be permitted with fractional permissions whereas writes require complete permissions. This distinction expresses the fact that reads on the same state do not conflict with each other. One may give s...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2009